using System;
using System.Data;
using System.Data.SqlClient;
using LibreriaCommon;
using LibreriaData;
using Microsoft.Practices.EnterpriseLibrary.Data;
using SistemaControlTraficoLibDS;

namespace SistemaControlTraficoLibData
{
    public class daCalle : daCalleBase, IDisposable
    {
        public daCalle(SecurityInfo securityInfo) : base(securityInfo)
        {
        }

        public virtual DataSet FindByTexto(string texto)
        {
            try
            {
                DataSet ds = new DataSet();
                daCommon.GenericFind(securityInfo, "CalleFindByTexto", ds, new string[] { "Calle" }, texto);
                return ds;
            }
            catch (Exception ex)
            {
                throw new daException(ex);
            }
        }

        public virtual dsCalle FindByPartidoNombre(int partidoId, string texto)
        {
            try
            {
                dsCalle ds = new dsCalle();
                daCommon.GenericFind(securityInfo, "CalleFindByPartidoNombre", ds, new string[] { ds.Calle.TableName }, partidoId, texto);
                return ds;
            }
            catch (Exception ex)
            {
                throw new daException(ex);
            }
        }
    }
}

